package com.example.config;

import com.example.util.JsonUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JsonUtilConfig {

    @Autowired
    public void initStatic(ObjectMapper objectMapper) {
        JsonUtil.setObjectMapper(objectMapper);   // 仅把值塞进静态字段
    }
}
